package aiball


class Player {

	String name;
	String sourceCode;
	
    static constraints = {
		name  size: 2..16, blank: false, matches: "[a-zA-Z_0-9]+"
		sourceCode blank: false//, validator: { if (!(new CompilerService()).compileAndParse(delegate, ""+it).isEmpty()) return ['custom.error', (new CompilerService()).compileAndParse(delegate, ""+it)]}
		
    }
	
	static mapping = {
		sourceCode type: 'text'
	 }
}
